* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #fff;

    --title-family: 'Pacifico', cursive;
    --text-family: SimSun, Arial, Helvetica, sans-serif;

    --header-height: 3.5rem;
}

html {
    scroll-behavior: smooth;
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: hsl(34, 16%, 75%);
}
::-webkit-scrollbar-thumb {
    background-color: hsl(34, 16%, 65%);
}
::-webkit-slider-thumb:hover {
    background-color: hsl(34, 16%, 55%);
}
/*=============== SCROLL UP ===============*/
.scrollup {
    position: fixed;
    /* bottom: 3rem; */
    bottom: -50%;
    right: 3rem;
    box-shadow: 0 4px 16px hsla(22, 100%, 8%, 0.2);
    color: var(--title-color);
    display: inline-flex;
    padding: 6px;
    font-size: 1.25rem;
    border-radius: 0.35rem;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 99999;
    transition: bottom 0.4s, transform 0.4s;
}
.scrollup:hover {
    transform: translateY(-0.5rem);
}
.show-scrollup {
    bottom: 5rem;
}

body {
    margin: 0;
    padding: 0;
    font-family: SimSun, sans-serif;
    font: 16px/1.5 'Frank Ruhl Libre', simsun, 'Times New Roman', Times, serif;

    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
}

li {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

// .active {
//     color: var(--primary-color);
//     // background-color: var(--text-secondary-color);
// }

.container {
    max-width: 1200px;
    margin-inline: auto;
}
p {
    font-size: 1.3rem;
    line-height: 1.5;
    text-align: justify;
}

header {
    width: 100%;
    transition: box-shadow 0.4s;
    font-size: 1.5rem;
    padding: 0 30px;
    background-color: var(--bg-color);
    font-weight: bold;
    // border-bottom: 1px solid #d5d5d5;

    .nav {
        position: relative;
        height: 100px;
        width: 1400px;
        margin-inline: auto;
        display: flex;
        justify-content: space-between;
        align-items: center;

        .nav__logo {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: bold;
            font-size: 2rem;
            font-style: italic;
            text-shadow: 1px 1px 1px #0000002e;
            // text-transform: uppercase;

            div {
                padding: 6px;
                border-radius: 0.5rem;
            }

            img {
                width: 100px;
            }
        }

        .nav__menu {
            display: flex;
            gap: 6rem;
            .nav__list {
                display: flex;
                gap: 2rem;
                text-align: center;
                align-items: center;

                .nav__link {
                    position: relative;
                }

                .nav__link::after {
                    content: '';
                    position: absolute;
                    bottom: -0.5rem;
                    left: 0;
                    width: 0;
                    height: 3px;
                    background-color: #f05a38;
                    transition: width 0.4s;
                }

                // .nav__link:hover::after {
                //     width: 60%;
                // }
            }
            .switch {
                --switch-width: 70px;
                --switch-height: 34px;
                --switch-border-radius: var(--switch-height);
                --switch-padding: 4px;
                --slider-width: calc(var(--switch-height) - var(--switch-padding) * 2);
                --slide-distance: calc(var(--switch-width) - var(--slider-width) - var(--switch-padding) * 2);

                position: relative;
                width: var(--switch-width);
                height: var(--switch-height);
                overflow: hidden;
                border-radius: var(--switch-border-radius);
                /* width: 70px;
            height: 34px; */
                box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);

                input {
                    position: absolute;
                    opacity: 0;
                    inset: 0;
                    z-index: 99999;
                }

                .slider {
                    position: absolute;
                    cursor: pointer;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    background-color: #cdd6dc;
                    -webkit-transition: 0.4s;
                    transition: 0.4s;

                    &:before {
                        position: absolute;
                        content: '';
                        /* height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px; */
                        height: var(--slider-width);
                        width: var(--slider-width);
                        left: var(--switch-padding);
                        bottom: var(--switch-padding);
                        background-color: white;
                        -webkit-transition: 0.4s;
                        transition: 0.4s;
                        z-index: 99999;
                        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                    }

                    /* Rounded sliders */
                    &.round {
                        /* border-radius: 34px; */
                        border-radius: var(--switch-border-radius);

                        &:before {
                            border-radius: 50%;
                        }
                    }
                }

                input:checked + .slider {
                    /* background-color: #2196f3; */
                }

                input:checked + .slider:before {
                    /* -webkit-transform: translateX(26px);
        -ms-transform: translateX(26px);
        transform: translateX(26px); */
                    transform: translateX(var(--slide-distance));
                }

                /* Style the labels */
                .switch-labels {
                    position: absolute;
                    top: 50%;
                    left: 30%;
                    transform: translate(-50%, -50%);
                    font-family: Arial, sans-serif;
                    /* margin-left: 70px; */
                    line-height: 34px;
                    z-index: 2;
                    color: #757575;
                    font-size: 14px;
                    font-weight: bold;
                    text-align: center;
                }
                .switch-labels.left {
                    left: 70%;
                }
            }
        }
    }
}
.shadow-header {
    color: #000 !important;
    background-color: #fff;
    box-shadow: 0 4px 16px hsla(22, 100%, 8%, 0.2);
}

/* Active link */
.active-link::after {
    // width: 60% !important;
}

.main {
    width: 100%;
    // overflow: hidden;
}

#home {
    width: 100%;
    height: 100vh;
    .home__bg {
        height: 80%;

        .title {
            width: fit-content;
            margin: 0;
            position: relative;
            top: 30%;
            left: 22%;
            h1 {
                font-size: 2.5rem;
                font-weight: thin;
            }
        }
    }

    .home__container {
        margin-top: 50px;
        p {
            font-size: 1.3rem;
            line-height: 1.5;
            text-align: justify;

            &::first-letter {
                float: left; /* 让首字母浮动在左侧 */
                font-size: 2em; /* 放大首字母 */
                line-height: 1.3; /* 防止首字母下沉 */
                margin-right: 0.2em; /* 调整字母间距 */
            }
        }
    }
}

.index h2 {
    width: fit-content;
    margin: 50px auto;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    position: relative;

    // &::after {
    //     position: absolute;
    //     content: "";
    //     width: 0;
    //     height: 5px;
    //     bottom: -5px;
    //     left: 0;
    //     background-color: #f05a38;
    //     transition: width 0.4s;
    // }
    // &:hover::after {
    //     width: 60%;
    // }
}

footer {
    width: 95%;
    margin: 0 auto;
    margin-top: 60px;

    height: 70px;
    cursor: pointer;
    font-weight: bold;

    border-top: 1px solid #000;

    p {
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        font-weight: normal;
    }
}

.banner {
    padding: 30px;
    display: flex;
    height: 800px;
    .left {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        gap: 30px;
        h3 {
            font-size: 32px;
            line-height: 1.2;
            text-transform: uppercase;
            text-align: center;
            letter-spacing: 1px;
            margin-bottom: 10px;
        }
        h4 {
            font-size: 24px;
            line-height: 1;
            text-transform: uppercase;
            text-align: center;
            margin-bottom: 5px;
        }
        .btn-primary {
            width: 500px;
        }
    }
    .right {
        flex: 2;
        background: url('https://cdn.pixabay.com/photo/2023/09/26/17/32/woman-8277925_1280.jpg') no-repeat center
            center/cover;
    }
}

.btn {
    margin: 0 auto;
    // width: 500px;
    width: fit-content;
    height: 45px;
    padding: 6px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    font-size: 26px;
    font-style: normal;
    color: #000;
    font-weight: 400 !important;
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
    position: relative;
    background-image: linear-gradient(to left, #000, #000) !important;
    background-repeat: no-repeat;
    background-size: 0%;
    background-position: 0%;
    transition: 0.3s ease-in-out all;
    letter-spacing: none;
    z-index: 2;
    cursor: pointer;
    line-height: initial;

    &:hover {
        background-size: 100%;
        color: #fff;
    }
}
.layout {
    max-width: 1400px;
    margin: 0 auto;
}

.theory {
    .banner {
        height: 600px;
        background: url('https://cdn.pixabay.com/photo/2024/06/17/07/34/woman-8835156_1280.png') no-repeat center
            center/cover;
    }

    main {
        h1 {
            font-size: 36px;
            text-align: center;
            margin: 100px auto 50px;
        }

        .timeline {
            max-width: 1400px;
            margin: 0 auto;
            position: relative;

            &::after {
                content: '';
                position: absolute;
                top: 0;
                left: 50%;
                transform: translateX(-50%);
                width: 5px;
                height: 100%;
                background-color: #f05a38;
                z-index: -1;
                border-radius: 99999px;
            }

            .container {
                display: flex;
                justify-content: center;
                align-items: center;
                margin-block: 100px 0;
                gap: 40px;

                .content {
                    flex: 1;
                    width: 500px;

                    img {
                        width: 200px;
                        height: 200px;
                        border-radius: 10%;
                    }

                    h2 {
                        margin: 20px 0;
                    }

                    p {
                        line-height: 1.5;
                        font-size: 1rem;
                    }
                }

                .dot {
                    width: 20px;
                    height: 20px;
                    border-radius: 50%;
                    background-color: #f05a38;
                }
                .time {
                    flex: 1;

                    font-size: 2rem;
                }
            }
            .right {
                flex-direction: row-reverse;

                .time {
                    text-align: right;
                }
            }
            .left {
                img {
                    display: block;
                    margin-left: auto;
                    margin-right: 0;
                }
                h2 {
                    text-align: right;
                }
            }
        }
    }
}

.test {
    .banner {
        height: 600px;
        background: url('https://cdn.pixabay.com/photo/2017/09/01/21/53/sunglasses-2705642_960_720.jpg') no-repeat
            center center/cover;
    }

    main {
        h1 {
            font-size: 36px;
            text-align: center;
            margin: 100px auto;
        }

        .content {
            max-width: 600px;
            margin: 0 auto;

            .item {
                margin-bottom: 60px;

                h2 {
                    margin-bottom: 30px;
                }

                .options {
                    display: flex;
                    align-items: center;
                    gap: 30px;
                    padding: 20px;
                    width: 100%;

                    .option {
                        flex: 1;
                        padding: 10px 20px;
                        border: 1px solid #000000;
                        border-radius: 5px;
                        cursor: pointer;
                        text-align: center;
                        transition: 0.3s ease-in-out all;

                        &:hover {
                            background-color: #0d9db6;
                            color: #fff;
                            border-color: #0d9db6;
                        }
                    }
                    .active {
                        background-color: #0d9db6;
                        color: #fff;
                        border-color: #0d9db6;
                    }
                }
            }
        }

        .btn {
            padding: 15px 30px;
            border-radius: 5px;
        }

        .result {
            max-width: 700px;
            margin: 100px auto;
            padding: 30px;
            background-color: #57b5c57c;

            h2 {
                margin-bottom: 20px;
            }
            p {
                line-height: 1.2;
                letter-spacing: 0;
                text-align: start;
            }
        }
    }
}

.contact {
    main {
        width: 80%;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;

        .left {
            flex: 1;
        }
        .right {
            flex: 1;

            h1 {
                font-size: 36px;
                text-align: center;
                margin: 100px auto 50px;
            }
            p {
                text-indent: 2em;
                width: 500px;
                margin: 0 auto;
                font-size: 14px;
            }
            form {
                width: 550px;
                margin: 70px auto 0;
                .item {
                    margin-bottom: 30px;
                    label {
                        display: block;
                        font-size: 18px;
                        margin-bottom: 10px;
                        font-weight: bold;
                    }
                    input,
                    textarea {
                        width: 100%;
                        padding: 15px;
                        border: 1px solid #000000;
                        font-size: 16px;
                    }
                    textarea {
                        height: 200px;
                    }
                }

                button {
                    margin: 50px auto 0;
                    width: 100%;
                    border: none;
                    padding: 10px 20px;
                    cursor: pointer;
                    font-size: 1.2rem;
                }
            }
        }
    }
}
